Skip to content

refactor: restructure scripts with binds layer and update error handling#45

Merged
amannocci merged 3 commits into
mainfrom
refactor/scripts-binds
Jul 14, 2026
Merged

refactor: restructure scripts with binds layer and update error handling#45
amannocci merged 3 commits into
mainfrom
refactor/scripts-binds

Conversation

@amannocci

@amannocci amannocci commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🧑‍💻 What is the change being made?

Reorganized the scripts directory into a two-tier structure:

  • scripts/binds/: Tool abstraction layer that wraps external commands (git, gh, uv, container, pre-commit, pyinstaller, ruff, basedpyright)
  • scripts/tasks/: High-level task implementations (build, env, generate, lint, release)

Enhanced with:

  • Consistent error handling using fatal() from scripts/utils.py
  • Modern Python patterns (match statements in build.py)
  • More specific PyInstaller interface with data file configuration
  • File-specific constants decentralized to individual task files
  • Docstrings added to all task functions

❓ Why is the change being made?

This restructuring provides:

  • Better separation of concerns between tool bindings and task execution
  • Reusable abstractions for integrating external tools into future scripts
  • Consistent error handling across the scripts module
  • Improved code readability through modern Python patterns
  • Reduced coupling by keeping constants local to files that use them
  • Better code documentation with consistent docstrings
  • Cleaner organization that scales as the project grows

✅ How has this been tested?

  • Pre-commit hooks verified: ruff check/format, gitlint all passed
  • All changes are internal to the scripts directory
  • Existing task runners (poe) updated and validated against new script locations
  • No changes to production code or tests

📚 How has this been documented?

Documentation follows existing patterns:

  • Docstrings added to all public task functions
  • Import organization follows project style conventions
  • Commit messages clearly describe each refactoring step

@amannocci amannocci self-assigned this Jul 14, 2026
@amannocci
amannocci marked this pull request as ready for review July 14, 2026 17:37
@amannocci
amannocci merged commit d1301a7 into main Jul 14, 2026
8 checks passed
@amannocci
amannocci deleted the refactor/scripts-binds branch July 14, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant